home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / c / restracklib_0_2.lha / ResTrackLib / graphics.c < prev    next >
C/C++ Source or Header  |  1994-07-31  |  2KB  |  92 lines

  1. /******************************************************************************
  2.  
  3.     MODUL
  4.     graphics.c
  5.  
  6.     DESCRIPTION
  7.  
  8.     NOTES
  9.  
  10.     BUGS
  11.  
  12.     TODO
  13.  
  14.     EXAMPLES
  15.  
  16.     SEE ALSO
  17.  
  18.     INDEX
  19.  
  20.     HISTORY
  21.     23. Jul 1994    Optimizer   created
  22.  
  23. ******************************************************************************/
  24.  
  25. /**************************************
  26.         Includes
  27. **************************************/
  28. #include <stdio.h>
  29. #include <exec/types.h>
  30.  
  31. #include <clib/graphics_protos.h>
  32. #ifdef REGARGS
  33. #   include <pragmas/graphics_pragmas.h>
  34.  
  35. extern struct Library * GfxBase;
  36. #endif
  37.  
  38.  
  39.  
  40. /**************************************
  41.         Globale Variable
  42. **************************************/
  43.  
  44.  
  45. /**************************************
  46.       Interne Defines & Strukturen
  47. **************************************/
  48.  
  49.  
  50. /**************************************
  51.         Interne Variable
  52. **************************************/
  53.  
  54.  
  55. /**************************************
  56.        Interne Prototypes
  57. **************************************/
  58.  
  59.  
  60. void __rtl_RectFill (struct RastPort * rp, WORD x1, WORD y1, WORD x2, WORD y2)
  61. {
  62.     if (x2 < x1)
  63.     {
  64.     x2 ^= x1, x1 ^= x2, x2 ^= x1;
  65.  
  66.     if (y2 < y1)
  67.     {
  68.         fprintf (stderr, "ERROR: RectFill() x2 < x1 and y2 < y1 (%d, %d, %d, %d)\n", y1, y2, y2, y1);
  69.  
  70.         y2 ^= y1, y1 ^= y2, y2 ^= y1;
  71.     }
  72.     else
  73.     {
  74.         fprintf (stderr, "ERROR: RectFill() x2 < x1 (%d, %d)\n", x1, x2);
  75.     }
  76.     }
  77.     else if (y2 < y1)
  78.     {
  79.     fprintf (stderr, "ERROR: RectFill() y2 < y1 (%d, %d)\n", y2, y1);
  80.  
  81.     y2 ^= y1, y1 ^= y2, y2 ^= y1;
  82.     }
  83.  
  84.     RectFill (rp, x1, y1, x2, y2);
  85.  
  86. } /* __rtl_RectFill */
  87.  
  88.  
  89. /******************************************************************************
  90. *****  ENDE graphics.c
  91. ******************************************************************************/
  92.